import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.DeserializationContext
import com.fasterxml.jackson.databind.JsonDeserializer

class PaidTypeDeserializer: JsonDeserializer<PaidType>() {
  override fun deserialize(p: JsonParser?, ctxt: DeserializationContext?): PaidType {
    return PaidType.findEnum(p!!.valueAsInt)
  }
}